fix(miner): route orb-export, deny-hook-synthesis, and laptop-init through openLocalStoreDb (#8319)#8529
Conversation
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8529 +/- ##
==========================================
- Coverage 89.58% 89.05% -0.53%
==========================================
Files 97 100 +3
Lines 22706 23041 +335
Branches 3872 3980 +108
==========================================
+ Hits 20341 20520 +179
- Misses 2187 2335 +148
- Partials 178 186 +8
Flags with carried forward coverage won't be shown. Click here to find out more.
|
|
Tip ✅ LoopOver review result - approve/merge recommendedReview updated: 2026-07-24 18:55:26 UTC
Review summary Nits — 3 non-blocking
Decision drivers
Context & advisory signals — never blocks the verdict
Linked issue satisfactionAddressed Review context
Contributor next steps
Signal definitions
🧪 Chat with LoopOverAsk LoopOver a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://loopover.ai/docs/loopover-commands 🧪 Experimental — new and may change. 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by LoopOver, a quiet PR intelligence layer for OSS maintainers.
|
…rough openLocalStoreDb (JSONbored#8319) Replace hand-rolled DatabaseSync open sequences with openLocalStoreDb so all three stores get crash-safe cleanup registration. Tests import .ts via variable specifier so CI's pre-test miner build does not leave codecov/patch at 0% on the .ts paths. Co-authored-by: Cursor <cursoragent@cursor.com>
620680f to
88321cd
Compare
Summary
Three local SQLite stores still hand-rolled
new DatabaseSync+ mkdir/chmod/busy_timeout instead ofopenLocalStoreDb, skipping crash-safe cleanup registration (#4826). This applies the same substitutionplan-store.ts/attempt-log.tsalready use.orb-export.ts/deny-hook-synthesis.ts/laptop-init.ts: open viaopenLocalStoreDb(laptop samplescreatedbefore open)..ts-via-variable dynamic imports so CI’s pre-test miner build does not attribute coverage to built.jswhile Codecov grades.ts(the.js-vs-.tsmismatch that closed fix(miner): route orb-export, deny-hook-synthesis, and laptop-init through openLocalStoreDb (#8319) #8500/fix(miner): delegate orb-export/deny-hook-synthesis/laptop-init DB opening to crash-safe openLocalStoreDb #8516 at 0% patch). Same pattern asminer-replay-snapshot.test.ts(replay-snapshot.ts's normalizeCommitSha has no format validation, letting a crafted value escape the intended snapshot directory via path.join #7796).Closes #8319
Scope
type(scope): short summaryConventional Commit format, for examplefix(api): restore profile access checks.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Closes #123) — a linked open issue is required for every contributor PR.Validation
git diff --checknpm run actionlintnpm run typechecknpm run test:coveragelocally;codecov/patchrequires ≥99% coverage of the lines AND branches you changed (aim for 100% on your diff so CI variance does not fail near the threshold). Global coverage is a non-blocking trend with a loose 90% backstop, not the gate.npm run test:workersnpm run build:mcpnpm run test:mcp-packnpm run ui:openapi:checknpm run ui:lintnpm run ui:typechecknpm run ui:buildnpm audit --audit-level=moderateIf any required check was skipped, explain why:
Miner-lib-only change. Reproduced the #8500/#8516 codecov failure locally (built
.jsbeside.ts→.tspatch at 0% under static.jsimports) and confirmed the.ts-via-variable import leaves the threeopenLocalStoreDb(...)lines hit on the.tspaths Codecov grades. Run fullnpm run test:cibefore push.Safety
UI Evidencesection below with JPG/JPEG or PNG screenshots. (N/A.)Notes
No import cycle for
laptop-init.ts→./local-store.js. Prior PRs for this issue failed codecov/patch at 0% because tests imported the built.js; this PR instruments the.tssource Codecov grades.